import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tsconfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
  plugins: [vue(), tsconfigPaths()],
  server: {
    proxy: {
      '/api': {
        target: 'http://10.1.6.130',
        changeOrigin: true,
        secure: false,
        rewrite: path => path.replace(/^\/api/, '/api/demo')
      }
    }
  }
})
